#include "matrixGraph.h"
void test01() {
    MGraph g1;
    char *nodeNames[] = {"V0", "V1", "V2", "V3"};
    initMGraph(&g1, 4, nodeNames, 0, 0);
    addMGraphEdge(&g1, 0, 1, 1);
}

void initMatGraph(MGraph *g1) {

    char *nodeNames[] = {"V1", "V2", "V3", "V4",
                         "V5", "V6", "V7", "V8"};
    initMGraph(g1, 8, nodeNames, 0, 0);
    addMGraphEdge(g1, 0, 1, 1);
    addMGraphEdge(g1, 0, 2, 1);
    addMGraphEdge(g1, 1, 3, 1);
    addMGraphEdge(g1, 1, 4, 1);
    addMGraphEdge(g1, 2, 5, 1);
    addMGraphEdge(g1, 2, 6, 1);
    addMGraphEdge(g1, 3, 7, 1);
    addMGraphEdge(g1, 4, 7, 1);
    addMGraphEdge(g1, 5, 6, 1);
}

int main() {
    MGraph g1;
    initMatGraph(&g1);

    printf("total edge number: %d\n", g1.edgeNum);
    printf("DFS: ");
    DFSMGraphTravel(&g1, 0);
    printf("\nBFS: ");
    BFSMGraphTravel(&g1, 0);
    return 0;
}
